<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Login</title>
	<meta name="content-type" content="text/html; charset=UTF-8" />
	<link REL="SHORTCUT ICON"
		href="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/images/logoTcBuen.ico" />
	<link rel="stylesheet" type="text/css"
		href="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css"	href="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/css/stylelogin.css" />
</h:head>
<h:body>
	<div class="container">

		<form id="loginForm" name="loginForm" action="j_spring_security_check"
			method="post" class="form-signin">
			<h2 class="form-signin-heading">Login</h2>

			<input id="usernameField" name="j_username" type="text"
				class="form-control" placeholder="Usuario" /> 
				
				<input	id="passwordField" name="j_password" type="password"
				class="form-control" placeholder="Contraseña"/>

			<button class="btn btn-lg btn-primary btn-block" type="submit">Iniciar Sesion</button>
		</form>

		<h3 class="form-signin-heading" style="text-align: center">
			<h:outputText rendered="${param.authfailed eq 'true'}"
				value="Error de Autenticación" />
			<h:outputText rendered="${param.loggedout eq 'true'}"
				value="loggedout" />
			<h:outputText rendered="${param.exceededAllowed eq 'true'}"
				value="exceededAllowed" />
		</h3>

	</div>
</h:body>
</html>